package com.wanmait.demo.controller.workercontroller;

import com.wanmait.demo.pojo.ComponentUse;
import com.wanmait.demo.service.CompontentUseService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class PartsController {
    @Resource
    private CompontentUseService compontentUseService;
    @RequestMapping("/worker/parts")
    @ModelAttribute("componentUses")
    public List<ComponentUse> selectList(){
     return compontentUseService.selectList();
    }
}
